﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

using Model;
using ValuationBLL;
using System.Web;
using System.IO;
namespace ValuationServers.Controllers
{
    public class ProspectingController : ApiController
    {

        UsersBll bll = new UsersBll();
        ProjectBLL pbll = new ProjectBLL();

        #region 勘查及图片上传
        /// <summary>
        /// 区位勘查
        /// </summary>
        /// <param name="elt"></param>
        /// <returns></returns>
        public bool Post(EALocation elt)
        {
            return bll.AddEAFloors<EALocation>(elt);

        }


        /// <summary>
        /// 小区勘查
        /// </summary>
        /// <param name="ell"></param>
        /// <returns></returns>
        public bool AddEAVillage(EAVillage ell)
        {
            return bll.InsertEAVillage<EAVillage>(ell);
        }


        /// <summary>
        /// 建筑勘查
        /// </summary>
        /// <param name="ef"></param>
        /// <returns></returns>
        public bool InsertEAFloors(EAFloors ef)
        {
            return bll.InsertEAFloors<EAFloors>(ef);
        }


        /// <summary>
        /// 室内勘查
        /// </summary>
        /// <param name="elr"></param>
        /// <returns></returns>

        public bool InsertEAIndoor(EAIndoor elr)
        {
            return bll.InsertEAIndoor<EAIndoor>(elr);
        }


        /// <summary>
        /// 上传图片
        /// </summary>
        /// <param name="photo"></param>
        /// <returns></returns>

        [HttpPost]
        public int Upload(EAPhoto photo)
        {
            return pbll.Upload(photo);
        }
        #endregion

       

    }
}
